package com.design.yjx.state;

/**
 * @author yuanjianxin
 * @date 2017/8/23 16:48
 */
public class SoldOutState implements State {
    private GumballMachine gumballMachine;

    public SoldOutState(GumballMachine gumballMachine) {
        this.gumballMachine = gumballMachine;
    }

    @Override
    public void refill() {
        System.out.println("加糖");
        gumballMachine.setState(gumballMachine.getNoQuarterState());
    }
}
